//
//  NFilterView.h
//  nncloud
//
//  Created by macfai on 2018/11/13.
//  Copyright © 2018 youedata. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

///这里同时用到了代理和block ，对比一下，block代码更紧凑，实现方式更简单，传值感觉更方便

@class NFilterView;
@class YearMonthPickerView;
@class STPickerSingle;

@protocol NFilterViewDelegate <NSObject>

@optional

///年月选择器用一个新的，这个有bug 弃用
//- (void)filterYearMonthPickerViewDidClickDone:(YearMonthPickerView *)yearMonthPickerView;

//这个依然使用
- (void)filterPickerSingle:(STPickerSingle *)picker selectedTitle:(NSString *)selectedTitle;

///比上个增加了一个参数
- (void)filterPickerSingle:(STPickerSingle *)picker selectedTitle:(NSString *)selectedTitle selectIndex:(NSInteger)selectIndex;

@end

typedef void (^timeActionBlock)(UIButton *btn);

@interface NFilterView : UIView

@property (nonatomic,strong)UIButton *leftBtn;
@property (nonatomic,strong)UIButton *midBtn;
@property (nonatomic,strong)UIButton *rightBtn;

@property (nonatomic, assign) id<NFilterViewDelegate> delegate;

@property (nonatomic,copy)timeActionBlock timeActionBolck;

@end

NS_ASSUME_NONNULL_END
